package com.zhongying.jf.validator;



import com.zhongying.jf.constant.StateCodeConstant;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by admin on 2017/10/10.
 */
public class UserInfoValidator {

    public static Map<String,Map> initActionMap(){
        Map<String,Map> actionMap=new HashMap<String,Map>();

        actionMap.put("register-0",setRegister0Data());        //个人投资人注册
        actionMap.put("register-1",setRegister1Data());        //个人借款人注册

        actionMap.put("register-000",setRegister000Data());    //个人借款人点立即投资注册
        actionMap.put("register-001",setRegister001Data());    //个人投资人点立即借款注册
        actionMap.put("register-002",setRegister000Data());    //企业借款人点立即投资注册
        actionMap.put("register-003",setRegister001Data());    //企业投资人点立即借款注册
        actionMap.put("WeChat-register-0",setWeChatRegister0Data());   //微信注册
        actionMap.put("WeChat-canbangka-0",setWeChatCanBangKa0Data());   //微信绑卡校验
        actionMap.put("WeChat-login-0",setWeChatLoginData());  //微信登录
        actionMap.put("App-register-0",setAppRegister0Data());   //微信注册
        actionMap.put("App-login-0",setAppLoginData());  //微信登录
        actionMap.put("App-canbangka-0",setAppCanBangKa0Data());   //微信绑卡校验
        actionMap.put("isbangka-0",setIsBangKa0Data());        //个人投资人绑卡校验
        actionMap.put("isbangka-1",setIsBangKa1Data());        //个人借款人绑卡校验
        actionMap.put("isbangka-2",setIsBangKa0Data());        //企业投资人绑卡校验
        actionMap.put("isbangka-3",setIsBangKa1Data());        //企业借款人绑卡校验
        actionMap.put("login",setLoginData());                  //登陆校验

        return actionMap;

    }

    /**
     * App投资人注册
     * @return
     */
    private static Map setAppRegister0Data(){
        Map<String,Map<String,Object>> codeMap=new HashMap<String,Map<String,Object>>();
        Map<String,Object> map1=new HashMap<String,Object>();
        map1.put("result",false);
        map1.put("msg","已注册投资人账号");
        map1.put("code", StateCodeConstant.ERROR_CODE);


        Map<String,Object> map2=new HashMap<String,Object>();
        map2.put("result",false);
        map2.put("msg","手机号已注册为借款人角色，请前往PC端登录后开通投资人角色");
        map2.put("code",StateCodeConstant.ERROR_CODE);
        codeMap.put("010000",map2);
        codeMap.put("010100",map2);
        codeMap.put("010001",map2);
        codeMap.put("010002",map2);

        Map<String,Object> map3=new HashMap<String,Object>();
        map3.put("result",false);
        map3.put("msg","账号已注册");
        map3.put("code",StateCodeConstant.HAS_REGISTER);
        codeMap.put("100000",map3);
        codeMap.put("101000",map3);
        codeMap.put("110000",map3);
        codeMap.put("111000",map3);
        codeMap.put("110100",map3);
        codeMap.put("111100",map3);
        codeMap.put("100010",map3);
        codeMap.put("100020",map3);
        codeMap.put("110010",map3);
        codeMap.put("110002",map3);
        codeMap.put("110011",map3);
        codeMap.put("110020",map3);
        codeMap.put("110001",map3);
        codeMap.put("110021",map3);
        codeMap.put("110012",map3);
        codeMap.put("110022",map3);
        codeMap.put("111111",map3);

        Map<String,Object> map4=new HashMap<String,Object>();
        map4.put("result",true);
        map4.put("msg","");
        map4.put("code",StateCodeConstant.SUCCESS_CODE);

        codeMap.put("000000",map4);
        return codeMap;
    }

    /**
     * 微信投资人注册
     * @return
     */
    private static Map setWeChatRegister0Data(){
        Map<String,Map<String,Object>> codeMap=new HashMap<String,Map<String,Object>>();
        Map<String,Object> map1=new HashMap<String,Object>();
        map1.put("result",false);
        map1.put("msg","已注册投资人账号");
        map1.put("code", StateCodeConstant.ERROR_CODE);


        /*DataResult dataResult2=new DataResult();
        dataResult2.setState(false);
        dataResult2.setErrMsg("手机号已注册为企业用户，请前往PC端操作");
        dataResult2.setStateCode(StateCodeConstant.ERROR_CODE);*/

        Map<String,Object> map3=new HashMap<String,Object>();
        map3.put("result",false);
        map3.put("msg","账号已注册");
        map3.put("code", StateCodeConstant.HAS_REGISTER);
        codeMap.put("100000",map3);
        codeMap.put("101000",map3);
        codeMap.put("110000",map3);
        codeMap.put("111000",map3);
        codeMap.put("110100",map3);
        codeMap.put("111100",map3);
        codeMap.put("100010",map3);
        codeMap.put("100020",map3);
        codeMap.put("110010",map3);
        codeMap.put("110002",map3);
        codeMap.put("110011",map3);
        codeMap.put("110020",map3);
        codeMap.put("110001",map3);
        codeMap.put("110021",map3);
        codeMap.put("110012",map3);
        codeMap.put("110022",map3);
        codeMap.put("111111",map3);

        Map<String,Object> map4=new HashMap<String,Object>();
        map4.put("result",true);
        map4.put("msg","");
        map4.put("code", StateCodeConstant.SUCCESS_CODE);
        codeMap.put("010000",map4);
        codeMap.put("010100",map4);
        codeMap.put("010001",map4);
        codeMap.put("010002",map4);
        codeMap.put("000000",map4);
        return codeMap;
    }

    /**
     * 投资人注册
     * @return
     */
    private static Map setRegister0Data(){
        Map<String,Map<String,Object>> codeMap=new HashMap<String,Map<String,Object>>();
        Map<String,Object> map1=new HashMap<String,Object>();
        map1.put("result",false);
        map1.put("msg","已注册投资人账号");
        map1.put("code", StateCodeConstant.ERROR_CODE);
        codeMap.put("100000",map1);
        codeMap.put("101000",map1);
        codeMap.put("100010",map1);
        codeMap.put("100020",map1);

        Map<String,Object> map2=new HashMap<String,Object>();
        map2.put("result",false);
        map2.put("msg","已注册借款人账号，请登录后于“我要投资-立即投资”开通投资人角色");
        map2.put("code", StateCodeConstant.ERROR_CODE);
        codeMap.put("010000",map2);
        codeMap.put("010100",map2);
        codeMap.put("010001",map2);
        codeMap.put("010002",map2);

        Map<String,Object> map3=new HashMap<String,Object>();
        map3.put("result",false);
        map3.put("msg","账号已注册");
        map3.put("code", StateCodeConstant.ERROR_CODE);
        codeMap.put("110000",map3);
        codeMap.put("111000",map3);
        codeMap.put("110100",map3);
        codeMap.put("111100",map3);
        codeMap.put("110010",map3);
        codeMap.put("110001",map3);
        codeMap.put("110011",map3);
        codeMap.put("110020",map3);
        codeMap.put("110002",map3);
        codeMap.put("110021",map3);
        codeMap.put("110012",map3);
        codeMap.put("110022",map3);
        codeMap.put("111111",map3);

        Map<String,Object> map4=new HashMap<String,Object>();
        map4.put("result",true);
        map4.put("msg","");
        map4.put("code", StateCodeConstant.SUCCESS_CODE);
        codeMap.put("000000",map4);
        return codeMap;
    }

    /**
     * 借款人注册
     * @return
     */
    private static Map setRegister1Data(){
        Map<String,Map<String,Object>> codeMap=new HashMap<String,Map<String,Object>>();
        Map<String,Object> map1=new HashMap<String,Object>();
        map1.put("result",false);
        map1.put("msg","已注册投资人账号，请登录后于“我的借款-立即借款”开通借款人角色");
        map1.put("code", StateCodeConstant.ERROR_CODE);
        codeMap.put("100000",map1);
        codeMap.put("101000",map1);
        codeMap.put("100010",map1);
        codeMap.put("100020",map1);

        Map<String,Object> map2=new HashMap<String,Object>();
        map2.put("result",false);
        map2.put("msg","已有借款人账号");
        map2.put("code", StateCodeConstant.ERROR_CODE);
        codeMap.put("010000",map2);
        codeMap.put("010100",map2);
        codeMap.put("010001",map2);
        codeMap.put("010002",map2);

        Map<String,Object> map3=new HashMap<String,Object>();
        map3.put("result",false);
        map3.put("msg","账号已注册");
        map3.put("code", StateCodeConstant.ERROR_CODE);
        codeMap.put("110000",map3);
        codeMap.put("111000",map3);
        codeMap.put("110100",map3);
        codeMap.put("111100",map3);
        codeMap.put("110010",map3);
        codeMap.put("110001",map3);
        codeMap.put("110011",map3);
        codeMap.put("110020",map3);
        codeMap.put("110002",map3);
        codeMap.put("110021",map3);
        codeMap.put("110012",map3);
        codeMap.put("110022",map3);
        codeMap.put("111111",map3);

        Map<String,Object> map4=new HashMap<String,Object>();
        map4.put("result",true);
        map4.put("msg","");
        map4.put("code", StateCodeConstant.SUCCESS_CODE);
        codeMap.put("000000",map4);
        return codeMap;
    }

    /**
     * 借款人点立即投资注册
     * @return
     */
    private static Map setRegister001Data(){
        Map<String,Map<String,Object>> codeMap=new HashMap<String,Map<String,Object>>();

        Map<String,Object> map1=new HashMap<String,Object>();
        map1.put("result",false);
        map1.put("msg","账号已注册");
        map1.put("code", StateCodeConstant.ERROR_CODE);
        codeMap.put("100000",map1);
        codeMap.put("101000",map1);
        codeMap.put("100010",map1);
        codeMap.put("110000",map1);
        codeMap.put("111000",map1);
        codeMap.put("110100",map1);
        codeMap.put("111100",map1);
        codeMap.put("110010",map1);
        codeMap.put("110001",map1);
        codeMap.put("110011",map1);
        codeMap.put("100020",map1);
        codeMap.put("110020",map1);
        codeMap.put("110002",map1);
        codeMap.put("110021",map1);
        codeMap.put("110012",map1);
        codeMap.put("110022",map1);
        codeMap.put("111111",map1);

        Map<String,Object> map2=new HashMap<String,Object>();
        map2.put("result",true);
        map2.put("msg","");
        map2.put("code", StateCodeConstant.SUCCESS_CODE);
        codeMap.put("010000",map2);
        codeMap.put("010100",map2);
        codeMap.put("010001",map2);
        codeMap.put("010002",map2);

        Map<String,Object> map3=new HashMap<String,Object>();
        map3.put("result",false);
        map3.put("msg","账号未注册");
        map3.put("code", StateCodeConstant.ERROR_CODE);
        codeMap.put("000000",map3);
        return codeMap;
    }

    /**
     * 投资人点立即投资注册
     * @return
     */
    private static Map setRegister000Data(){
        Map<String,Map<String,Object>> codeMap=new HashMap<String,Map<String,Object>>();

        Map<String,Object> map1=new HashMap<String,Object>();
        map1.put("result",false);
        map1.put("msg","账号已注册");
        map1.put("code", StateCodeConstant.ERROR_CODE);
        codeMap.put("010000",map1);
        codeMap.put("010100",map1);
        codeMap.put("010001",map1);
        codeMap.put("110000",map1);
        codeMap.put("111000",map1);
        codeMap.put("110100",map1);
        codeMap.put("111100",map1);
        codeMap.put("110010",map1);
        codeMap.put("110001",map1);
        codeMap.put("110011",map1);
        codeMap.put("010002",map1);
        codeMap.put("110020",map1);
        codeMap.put("110002",map1);
        codeMap.put("110021",map1);
        codeMap.put("110012",map1);
        codeMap.put("110022",map1);
        codeMap.put("111111",map1);

        Map<String,Object> map2=new HashMap<String,Object>();
        map2.put("result",true);
        map2.put("msg","");
        map2.put("code", StateCodeConstant.SUCCESS_CODE);
        codeMap.put("100000",map2);
        codeMap.put("101000",map2);
        codeMap.put("100010",map2);
        codeMap.put("100020",map2);

        Map<String,Object> map3=new HashMap<String,Object>();
        map3.put("result",false);
        map3.put("msg","账号未注册");
        map3.put("code", StateCodeConstant.ERROR_CODE);
        codeMap.put("000000",map3);
        return codeMap;
    }

    /**
     * 微信投资人绑卡校验
     * @return
     */
    private static Map setWeChatCanBangKa0Data(){
        Map<String,Map<String,Object>> codeMap=new HashMap<String,Map<String,Object>>();
        Map<String,Object> map1=new HashMap<String,Object>();
        map1.put("result",true);
        map1.put("msg","未进行绑卡注册");
        map1.put("code", StateCodeConstant.ERROR_NO_CERTIFICATE_CODE);
        codeMap.put("100000",map1);
        codeMap.put("110000",map1);
        codeMap.put("110100",map1);

        Map<String,Object> map2=new HashMap<String,Object>();
        map2.put("result",false);
        map2.put("msg","已绑卡");
        map2.put("code", StateCodeConstant.SUCCESS_CODE);
        codeMap.put("111000",map2);
        codeMap.put("101000",map2);
        codeMap.put("100010",map2);
        codeMap.put("111100",map2);
        codeMap.put("110010",map2);
        codeMap.put("110011",map2);
        codeMap.put("110021",map2);
        codeMap.put("110012",map2);
        codeMap.put("110020",map2);
        codeMap.put("100020",map2);
        codeMap.put("110022",map2);
        codeMap.put("111111",map2);

        Map<String,Object> map3=new HashMap<String,Object>();
        map3.put("result",false);
        map3.put("msg","未注册投资人账号");
        map3.put("code", StateCodeConstant.ERROR_CODE);
        codeMap.put("010000",map3);
        codeMap.put("010100",map3);
        codeMap.put("010001",map3);
        codeMap.put("010002",map3);

        Map<String,Object> map4=new HashMap<String,Object>();
        map4.put("result",false);
        map4.put("msg","您申请的企业借款认证正在审核中，请等待审核通过后再申请投资认证");
        map4.put("code", StateCodeConstant.ERROR_NO_COMPANY_LOAN_CERTIFICATE_CODE);
        codeMap.put("110002",map4);

        Map<String,Object> map5=new HashMap<String,Object>();
        map5.put("result",false);
        map5.put("msg","您的借款人角色已认证为企业，请前往PC端进行企业投资人认证");
        map5.put("code", StateCodeConstant.ERROR_CODE);
        codeMap.put("110001",map5);

        Map<String,Object> map6=new HashMap<String,Object>();
        map6.put("result",false);
        map6.put("msg","账号未注册");
        map6.put("code", StateCodeConstant.ERROR_CODE);
        codeMap.put("000000",map6);
        return codeMap;
    }
    /**
     * App投资人绑卡校验
     * @return
     */
    private static Map setAppCanBangKa0Data(){
        Map<String,Map<String,Object>> codeMap=new HashMap<String,Map<String,Object>>();
        Map<String,Object> map1=new HashMap<String,Object>();
        map1.put("result",true);
        map1.put("msg","未进行绑卡注册");
        map1.put("code", StateCodeConstant.ERROR_NO_CERTIFICATE_CODE);
        codeMap.put("100000",map1);
        codeMap.put("110000",map1);
        codeMap.put("110100",map1);

        Map<String,Object> map2=new HashMap<String,Object>();
        map2.put("result",false);
        map2.put("msg","已绑卡");
        map2.put("code", StateCodeConstant.SUCCESS_CODE);
        codeMap.put("111000",map2);
        codeMap.put("101000",map2);
        codeMap.put("100010",map2);
        codeMap.put("111100",map2);
        codeMap.put("110010",map2);
        codeMap.put("110011",map2);
        codeMap.put("110021",map2);
        codeMap.put("110012",map2);
        codeMap.put("110020",map2);
        codeMap.put("100020",map2);
        codeMap.put("110022",map2);
        codeMap.put("111111",map2);

        Map<String,Object> map3=new HashMap<String,Object>();
        map3.put("result",false);
        map3.put("msg","未注册投资人账号");
        map3.put("code", StateCodeConstant.ERROR_CODE);
        codeMap.put("010000",map3);
        codeMap.put("010100",map3);
        codeMap.put("010001",map3);
        codeMap.put("010002",map3);

        Map<String,Object> map4=new HashMap<String,Object>();
        map4.put("result",false);
        map4.put("msg","您申请的企业借款认证正在审核中，请等待审核通过后再申请投资认证");
        map4.put("code", StateCodeConstant.ERROR_NO_COMPANY_LOAN_CERTIFICATE_CODE);
        codeMap.put("110002",map4);

        Map<String,Object> map5=new HashMap<String,Object>();
        map5.put("result",false);
        map5.put("msg","您的借款人角色已认证为企业，请前往PC端进行企业投资人认证");
        map5.put("code", StateCodeConstant.ERROR_CODE);
        codeMap.put("110001",map5);

        Map<String,Object> map6=new HashMap<String,Object>();
        map6.put("result",false);
        map6.put("msg","账号未注册");
        map6.put("code", StateCodeConstant.ERROR_CODE);
        codeMap.put("000000",map6);
        return codeMap;
    }

    /**
     * 投资人绑卡校验
     * @return
     */
    private static Map setIsBangKa0Data(){
        Map<String,Map<String,Object>> codeMap=new HashMap<String,Map<String,Object>>();
        Map<String,Object> map1=new HashMap<String,Object>();
        map1.put("result",false);
        map1.put("msg","未进行绑卡注册");
        map1.put("code", StateCodeConstant.ERROR_NO_CERTIFICATE_CODE);
        codeMap.put("100000",map1);
        codeMap.put("110000",map1);

        Map<String,Object> map2=new HashMap<String,Object>();
        map2.put("result",true);
        map2.put("msg","已绑卡");
        map2.put("code", StateCodeConstant.SUCCESS_CODE);
        codeMap.put("111000",map2);
        codeMap.put("101000",map2);
        codeMap.put("100010",map2);
        codeMap.put("111100",map2);
        codeMap.put("110010",map2);
        codeMap.put("110011",map2);
        codeMap.put("110021",map2);
        codeMap.put("110012",map2);
        codeMap.put("110020",map2);
        codeMap.put("100020",map2);
        codeMap.put("110022",map2);
        codeMap.put("111111",map2);

        Map<String,Object> map3=new HashMap<String,Object>();
        map3.put("result",false);
        map3.put("msg","未注册投资人账号");
        map3.put("code", StateCodeConstant.ERROR_CODE);
        codeMap.put("010000",map3);
        codeMap.put("010100",map3);
        codeMap.put("010001",map3);
        codeMap.put("010002",map3);

        Map<String,Object> map4=new HashMap<String,Object>();
        map4.put("result",false);
        map4.put("msg","未进行个人绑卡注册");
        map4.put("code", StateCodeConstant.ERROR_NO_PERSONAL_CERTIFICATE_CODE);
        codeMap.put("110100",map4);

        Map<String,Object> map5=new HashMap<String,Object>();
        map5.put("result",false);
        map5.put("msg","未进行企业绑卡注册");
        map5.put("code", StateCodeConstant.ERROR_NO_COMPANY_CERTIFICATE_CODE);
        codeMap.put("110001",map5);

        Map<String,Object> map6=new HashMap<String,Object>();
        map6.put("result",false);
        map6.put("msg","您申请的企业借款认证正在审核中，请等待审核通过后再申请投资认证");
        map6.put("code", StateCodeConstant.ERROR_NO_COMPANY_LOAN_CERTIFICATE_CODE);
        codeMap.put("110002",map6);

        Map<String,Object> map7=new HashMap<String,Object>();
        map7.put("result",false);
        map7.put("msg","账号未注册");
        map7.put("code", StateCodeConstant.ERROR_CODE);
        codeMap.put("000000",map7);
        return codeMap;
    }




    /**
     * 借款人绑卡校验
     * @return
     */
    private static Map setIsBangKa1Data(){
        Map<String,Map<String,Object>> codeMap=new HashMap<String,Map<String,Object>>();
        Map<String,Object> map1=new HashMap<String,Object>();
        map1.put("result",false);
        map1.put("msg","未进行绑卡注册");
        map1.put("code", StateCodeConstant.ERROR_NO_CERTIFICATE_CODE);
        codeMap.put("010000",map1);
        codeMap.put("110000",map1);

        Map<String,Object> map2=new HashMap<String,Object>();
        map2.put("result",true);
        map2.put("msg","已绑卡");
        map2.put("code", StateCodeConstant.SUCCESS_CODE);
        codeMap.put("111100",map2);
        codeMap.put("110011",map2);
        codeMap.put("010100",map2);
        codeMap.put("010001",map2);
        codeMap.put("110100",map2);
        codeMap.put("110001",map2);
        codeMap.put("010002",map2);
        codeMap.put("110021",map2);
        codeMap.put("110012",map2);
        codeMap.put("110002",map2);
        codeMap.put("110022",map2);

        Map<String,Object> map3=new HashMap<String,Object>();
        map3.put("result",false);
        map3.put("msg","未注册借款人人账号");
        map3.put("code", StateCodeConstant.ERROR_CODE);
        codeMap.put("100000",map3);
        codeMap.put("100010",map3);
        codeMap.put("101000",map3);
        codeMap.put("100020",map3);

        Map<String,Object> map4=new HashMap<String,Object>();
        map4.put("result",false);
        map4.put("msg","未进行个人绑卡注册");
        map4.put("code", StateCodeConstant.ERROR_NO_PERSONAL_CERTIFICATE_CODE);
        codeMap.put("111000",map4);

        Map<String,Object> map5=new HashMap<String,Object>();
        map5.put("result",false);
        map5.put("msg","未进行企业绑卡注册");
        map5.put("code", StateCodeConstant.ERROR_NO_COMPANY_CERTIFICATE_CODE);
        codeMap.put("110010",map5);

        Map<String,Object> map6=new HashMap<String,Object>();
        map6.put("result",false);
        map6.put("msg","您申请的企业投资认证正在审核中，请等待审核通过后再申请借款认证");
        map6.put("code", StateCodeConstant.ERROR_NO_COMPANY_INVEST_CERTIFICATE_CODE);
        codeMap.put("110020",map6);

        Map<String,Object> map7=new HashMap<String,Object>();
        map7.put("result",false);
        map7.put("msg","账号未注册");
        map7.put("code", StateCodeConstant.ERROR_CODE);
        codeMap.put("000000",map7);
        return codeMap;
    }

    /**
     * 微信登陆校验
     * @return
     */
    private static Map setWeChatLoginData(){

        Map<String,Map<String,Object>> codeMap=new HashMap<String,Map<String,Object>>();
        Map<String,Object> map1=new HashMap<String,Object>();
        map1.put("result",true);
        map1.put("msg","");
        map1.put("code", StateCodeConstant.SUCCESS_CODE);
        codeMap.put("100000",map1);
        codeMap.put("100010",map1);
        codeMap.put("101000",map1);
        codeMap.put("100020",map1);
        codeMap.put("110000",map1);
        codeMap.put("111100",map1);
        codeMap.put("110010",map1);
        codeMap.put("110100",map1);
        codeMap.put("110020",map1);
        codeMap.put("110022",map1);
        codeMap.put("110021",map1);
        codeMap.put("111000",map1);
        codeMap.put("110012",map1);
        codeMap.put("110011",map1);
        codeMap.put("110002",map1);
        codeMap.put("110001",map1);

        /*DataResult dataResult2=new DataResult();
        dataResult2.setState(false);
        dataResult2.setErrMsg("您的借款人角色已认证为企业且投资人未认证，请前往PC端登录认证");
        dataResult2.setStateCode(StateCodeConstant.MULTI_ROLE_CODE);*/

        Map<String,Object> map2=new HashMap<String,Object>();
        map2.put("result",false);
        map2.put("msg","手机号或密码错误");
        map2.put("code", StateCodeConstant.NO_REGISTER);
        codeMap.put("000000",map2);

        Map<String,Object> map3=new HashMap<String,Object>();
        map3.put("result",false);
        map3.put("msg","您的账户为借款人，若要投资请重新注册投资账户");
        map3.put("code", StateCodeConstant.HAS_DEBTOR);
        codeMap.put("010000",map3);
        codeMap.put("010100",map3);
        codeMap.put("010001",map3);
        codeMap.put("010002",map3);

        return codeMap;
    }

    /**
     * App微信登陆校验
     * @return
     */
    private static Map setAppLoginData(){
        Map<String,Map<String,Object>> codeMap=new HashMap<String,Map<String,Object>>();
        Map<String,Object> map1=new HashMap<String,Object>();
        map1.put("result",true);
        map1.put("msg","");
        map1.put("code", StateCodeConstant.SUCCESS_CODE);
        codeMap.put("100000",map1);
        codeMap.put("100010",map1);
        codeMap.put("101000",map1);
        codeMap.put("100020",map1);
        codeMap.put("110000",map1);
        codeMap.put("111100",map1);
        codeMap.put("110010",map1);
        codeMap.put("110100",map1);
        codeMap.put("110020",map1);
        codeMap.put("110022",map1);
        codeMap.put("110021",map1);
        codeMap.put("111000",map1);
        codeMap.put("110012",map1);
        codeMap.put("110011",map1);
        codeMap.put("110002",map1);
        codeMap.put("110001",map1);

        /*DataResult dataResult2=new DataResult();
        dataResult2.setState(false);
        dataResult2.setErrMsg("您的借款人角色已认证为企业且投资人未认证，请前往PC端登录认证");
        dataResult2.setStateCode(StateCodeConstant.MULTI_ROLE_CODE);*/

        Map<String,Object> map2=new HashMap<String,Object>();
        map2.put("result",false);
        map2.put("msg","手机号或密码错误");
        map2.put("code", StateCodeConstant.NO_REGISTER);
        codeMap.put("000000",map2);

        Map<String,Object> map3=new HashMap<String,Object>();
        map3.put("result",false);
        map3.put("msg","您的账户为借款人，请先前往PC端登录后开通投资人角色");
        map3.put("code", StateCodeConstant.HAS_DEBTOR);
        codeMap.put("010000",map3);
        codeMap.put("010100",map3);
        codeMap.put("010001",map3);
        codeMap.put("010002",map3);

        return codeMap;
    }

    /**
     * 登陆校验
     * @return
     */
    private static Map setLoginData(){
        Map<String,Map<String,Object>> codeMap=new HashMap<String,Map<String,Object>>();
        Map<String,Object> map1=new HashMap<String,Object>();
        map1.put("result",true);
        map1.put("msg","");
        map1.put("code", StateCodeConstant.SUCCESS_CODE);
        codeMap.put("010000",map1);
        codeMap.put("010100",map1);
        codeMap.put("010001",map1);
        codeMap.put("100000",map1);
        codeMap.put("100010",map1);
        codeMap.put("101000",map1);
        codeMap.put("100020",map1);
        codeMap.put("010002",map1);

        Map<String,Object> map2=new HashMap<String,Object>();
        map2.put("result",false);
        map2.put("msg","请选择要登录帐号的角色");
        map2.put("code", StateCodeConstant.MULTI_ROLE_CODE);
        codeMap.put("110000",map2);
        codeMap.put("111100",map2);
        codeMap.put("110011",map2);
        codeMap.put("111000",map2);
        codeMap.put("110010",map2);
        codeMap.put("110100",map2);
        codeMap.put("110001",map2);
        codeMap.put("110020",map2);
        codeMap.put("110002",map2);
        codeMap.put("110021",map2);
        codeMap.put("110012",map2);
        codeMap.put("110022",map2);

        Map<String,Object> map3=new HashMap<String,Object>();
        map3.put("result",false);
        map3.put("msg","手机号或密码错误");
        map3.put("code", StateCodeConstant.ERROR_CODE);
        codeMap.put("000000",map3);
        return codeMap;
    }


}
